<template>
    <div>
        <Dialog v-model="dialogVisible1" :title="props.FeedbackData.title" width="420">
            <div class="message_p">
                <el-form :model="state.form" label-width="120px" label-position="top">
                    <el-form-item label="反馈内容" v-if="props.FeedbackData.title!='放弃入职'">
                        <el-input v-model="state.form.content" placeholder="请输入反馈内容"/>
                    </el-form-item>
                    <el-form-item label="放弃入职原因" v-else>
                        <el-input v-model="state.form.content" placeholder="请输入放弃入职原因"/>
                    </el-form-item>
                    <div class="flex jcfe aic" style="width: 100%;">
                        <el-button @click="DialogClose">取消</el-button>
                        <el-button type="primary" @click="sureClick">确定</el-button>
                    </div>
                </el-form>
            </div>
        </Dialog>
    </div>
</template>
<script lang="ts" setup>
import { ref, reactive } from 'vue'
import { Dialog } from '@/components/Dialog'
import { ElButton } from 'element-plus'
const dialogVisible1 = ref(false)
const loading = ref(false)
const emit = defineEmits(['FeedbackClick'])
const props = defineProps({
    FeedbackData: {
        type: Object,
        default: () => {
            return {}
        }
    }

})

const state = reactive({
    form: {} as any,
})
const DialogOpen = () => {
    dialogVisible1.value = true
}
const DialogClose = () => {
    dialogVisible1.value = false
}
const sureClick = () => {
    loading.value = true
    emit('FeedbackClick',state.form.content)
}
// 暴露方法
defineExpose({
    DialogOpen,
    DialogClose
})
</script>
<style lang="less">
.el-dialog__header {
    padding: 10px;
    border-bottom: 1px solid #D8D8D8;
}

.el-dialog__body {
    padding: 20px;
}
</style>
<style lang="less" scoped>
.message_p {
    padding: 0px 10px 20px 10px;
}

.el-button {
    margin-top: 20px;
    width: 134px;
    height: 40px;
}
</style>